﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>资料上传</title>
    <link rel="stylesheet" type="text/css" href="../Content/Css/OperaMasksUI/default/om-all.css" />
    <link rel="stylesheet" type="text/css" href="../Content/Css/list.css" />
    <script type="text/javascript" src="../Scripts/jquery.1.6.3.min.js"></script>
    <script type="text/javascript" src="../Scripts/json2.js"></script>
    <script type="text/javascript" src="../Scripts/common.js"></script>
    <script type="text/javascript" src="../Scripts/OperaMasksUI/operamasks-ui.min.js"></script>
    <script type="text/javascript" src="../Scripts/Plugin/jquery.form.js"></script>
    <script type="text/javascript" src="../Scripts/OperaMasksUI/Plugin/om-yj-container.js"></script>
    <script type="text/javascript" src="../Scripts/Plugin/artDialog4.1.7/jquery.artDialog.js?skin=default"></script>
    <script type="text/javascript" src="../Scripts/Plugin/artDialog4.1.7/plugins/iframeTools.js"></script>
    <script src="../Scripts/Plugin/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        var detailPanel, listGrid, detailGrid, colData, detailColData, searchPanel, defaultSort, defaultWhere, validatorForm, submitForm, currentUID, currentGIndex = -1, genRenderCheckbox, genRenderDateformat;
        var showSearchPanel, showToolBar, showDetialForm, controlBtn, oldRowData, detailForm, goOn = true, DoFlag = true, ifh;

        $(document).ready(function () {
            currentUID = art.dialog.data('currentUID');
            showSearchPanel();
        });

        showSearchPanel = function () {
            $('#uploadify').uploadify({
                uploader: '../Handler/fileupload.ashx',
                swf: '../Scripts/Plugin/uploadify/uploadify.swf',
                cancelImage: '../Scripts/Plugin/uploadify/cancel.png',
                width: 120,
                height: 30,
                buttonClass: "btnCss",
                buttonText: "资料选择",
                buttonCursor: 'hand',
                fileObjName: 'Filedata',
                fileTypeExts: "*.ZIP",
                fileTypeDesc: "请选择文件",
                auto: true,
                multi: false,
                queueSizeLimit: 1,
                queueID: 'uploadQueue',
                onFallback: function () {
                    alert("您未安装FLASH控件,无法上传图片!请安装FLASH控件后再试.");
                },
                onUploadStart: function (file) {
                    $('#uploadify').uploadify('settings', 'formData', { 'uploadtype': 'Attachment', 'uid': art.dialog.data('UID') });
                },
                onUploadSuccess: function (file, data, response) {
                    if (data.indexOf("ER") > -1) {
                        alert(data);
                    }
                    else {
                        $.omMessageBox.alert({
                            content: '上传成功',
                            onClose: function () {
                                art.dialog.close();
                            }
                        });
                    }
                }
            });

            $('#button-close').click(function () {
                art.dialog.close();
            });
        };
    </script>
</head>
<body>
    <table style="margin-top: 5px; margin-left: 20px; width:100%;">
        <tr>
            <td>
                <span id='uploadify'></span>
            </td>
        </tr>
        <tr>
            <td >
                <div id="uploadQueue"></div>
            </td>
        </tr>
    </table>
</body>
</html>
